package sevensoft.行为型模式.备忘录模式.白箱备忘录;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Word {

    private String content;

    public WordMemento save() {
        return new WordMemento(content);
    }

    public void recover(WordMemento wordMemento){
        this.content=wordMemento.getContent();
    }
}
